package org.csu.softwaremetrics_demo.service.impl.java;

import org.csu.softwaremetrics_demo.entity.entry.CK;
import org.csu.softwaremetrics_demo.entity.result.impl.CKMetricResult;
import org.csu.softwaremetrics_demo.service.JavaCodeMetricService;
import org.springframework.stereotype.Service;

import java.io.File;

/**
 * @Description: Java代码CK度量服务类
 * @Author: Jukomu
 * @Package: org.csu.softwaremetrics_demo.service
 * @Project: SoftwareMetrics_demo
 * @name: CKService
 * @Date: 2025/4/6-20:38
 * @Filename: CKService
 */
@Service
public class CKService implements JavaCodeMetricService<CKMetricResult> {
    private CK ck = new CK();

    @Override
    public CKMetricResult calculate(File file) {
        return ck.calculate(file.getPath());
    }
}
